package org.eae.eldf.webapp.controller.frame;

import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;

import javax.annotation.Resource;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.ShortBufferException;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 
 * @ClassName: FremeMenuController  <BR>
 * class description:  <BR>
 * Remark: <BR>
 * @version 1.00 2015年10月20日
 * @author csq
 */
@Controller
@RequestMapping(value = "/frame/menu")
public class FrameMenuController {

	

	
	@RequestMapping(value = "chkMenuId")
	@ResponseBody
	public String chkMenuId(String menuId,String Lvl,String menufold,HttpServletRequest request) throws InvalidKeyException, ShortBufferException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException, ClassNotFoundException, IOException {
		if("1".equals(Lvl)){//menuId=first lvl menu
			request.getSession().setAttribute("topMenuId", menuId);
			request.getSession().setAttribute("menufold", menufold);
		}else{
			request.getSession().setAttribute("subMenuId", menuId);
		}
		return "success";
	}
}
